package com.ym.b2b.product.dao.impl;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.ym.b2b.commons.dao.BaseDao;
import com.ym.b2b.product.dao.EmKStorageDao;
import com.ym.b2b.product.sqlbean.EmKStorage;

import java.util.List;

@Repository
public class EmKStorageDaoImpl<T> extends BaseDao<T> implements EmKStorageDao {

    @Override
    public void insertEmKStorage(EmKStorage EmKStorage) throws DataAccessException {
        insert("EM_K_STORAGE.insertEmKStorage", EmKStorage);

    }

    @Override
    public void deleteEmKStorage(EmKStorage EmKStorage) throws DataAccessException {
        delete("EM_K_STORAGE.deleteEmKStorage", EmKStorage);

    }

    @Override
    public EmKStorage showEmKStorage(EmKStorage EmKStorage) throws DataAccessException {

        return (EmKStorage) find("EM_K_STORAGE.searchEmKStorage", EmKStorage);
    }

    @Override
    public EmKStorage showEmKStorageForAmount(EmKStorage EmKStorage) throws DataAccessException {

        return (EmKStorage) find("EM_K_STORAGE.searchEmKStorageAmount", EmKStorage);
    }

    @Override
    public List<EmKStorage> searchEmkStorageList(EmKStorage EmKStorage) throws DataAccessException {
        return list("EM_K_STORAGE.searchEmkStorageList", EmKStorage);
    }

}
